package com.ssy.lingxi.logistics.controller;

import com.ssy.lingxi.common.controller.BaseController;
import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import com.ssy.lingxi.common.model.vo.SelectVO;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.logistics.service.ISelectService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @menu 平台后台 - 物流能力 - 下拉框
 * @author yzc
 * @version 2.0.0
 * @date 2020/7/10
 */
@RestController
@RequestMapping("/logistics/platform/select")
public class PlatformSelectController extends BaseController {

    @Resource
    private ISelectService selectService;

    /**
     * 平台后台 - 物流公司下拉查询(平台类型,模糊匹配)
     * @param name 名称
     * @return 返回结果
     */
    @GetMapping(value = "/listMemberCompanyQuery")
    public Wrapper<List<SelectVO>> listMemberCompanyQuery(@RequestParam(value = "name", defaultValue = "") String name) {
        UserLoginCacheDTO sysUser = getSysUser();
        return selectService.listPlatformMemberCompanyQuery(name);
    }
}
